package com.ciei.dpagm.service;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ciei.dpagm.common.converter.JsonConverter;
import com.ciei.dpagm.common.service.BaseService;
import com.ciei.dpagm.entity.ProjectMasterChipClockParameter;
import com.ciei.dpagm.entity.ProjectMasterChipConfig;
import com.ciei.dpagm.entity.Users;
import com.ciei.dpagm.mapper.ProjectMasterChipConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author pp
 * @date 2023/05/09
 */
@Service
public class ProjectMasterChipConfigService extends BaseService<ProjectMasterChipConfigMapper, ProjectMasterChipConfig> {


    /**
     * 获取列表
     * @param masterChipComponentIdList
     * @return
     */
    public List<ProjectMasterChipConfig> getList(List<String> masterChipComponentIdList){
        if(masterChipComponentIdList.isEmpty()){
            return new ArrayList<>();
        }
        LambdaQueryWrapper<ProjectMasterChipConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.in(ProjectMasterChipConfig::getComponentId,masterChipComponentIdList);
        return list(lambdaQueryWrapper);
    }
}
